import request from "@/utils/request";

// 收藏数据分页查询
export function page(pageNum, pageSize, params)  {
    const data = {
        pageNum,
        pageSize,
        params
    }
    return request({
        url: "/collect/page/",
        method: 'post',
        data: data
    })
}

// 添加收藏
export function addCollect(userId, bookId, bookName) {
    const data = {
        userId, bookId, bookName
    }
    return request({
        url: "/collect/add/",
        method: 'post',
        data: data
    })
}

// 取消收藏
export function removeCollect(id) {
    return request({
        url: "/collect/remove/",
        method: 'post',
        data: id
    })
}
